﻿<%@ Page Language="C#" MasterPageFile="~/Admin/SiteAdmin.Master" AutoEventWireup="true" CodeBehind="DanhSachThanhVien.aspx.cs" Inherits="DM.Web.Admin.QuanLyThanhVien.DanhSachThanhVien" Title="Công ty cổ phần Đường Man - Duong Malt JSC" %>
<%@ Import Namespace="DM.DAO" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <h1>Danh sách người sử dụng</h1>
    <br />
    <br />
    <br />
    <br />
    <asp:GridView ID="GridViewNSD" runat="server"  BackColor="White" BorderColor="#51A5B8"
                BorderStyle="Solid" BorderWidth="1px" CellPadding="4" GridLines="Horizontal" AllowPaging="True" AllowSorting="True" Width="100%" AutoGenerateColumns="False" DataKeyNames="Ma" HorizontalAlign="Center" OnSorting="GridViewNSD_Sorting" EnableViewState="false"  OnPageIndexChanging="GridViewNSD_PageIndexChanging" OnRowDeleting="GridViewNSD_RowDeleting">
                <RowStyle BackColor="GhostWhite" ForeColor="#333333" BorderColor="Gray" BorderStyle="Solid" BorderWidth="1px" />
                <FooterStyle BackColor="#51A5B8" ForeColor="#333333" HorizontalAlign="Center" VerticalAlign="Middle" />
                <PagerStyle BackColor="#51A5B8" ForeColor="WhiteSmoke" BorderColor="Gray" BorderStyle="Solid" BorderWidth="1px" Wrap="False" Font-Overline="False" Font-Size="Smaller" Font-Strikeout="False" Font-Underline="False" HorizontalAlign="Right" />
                <SelectedRowStyle BackColor="#339966" Font-Bold="True" ForeColor="White" Wrap="True" />
                <HeaderStyle BackColor="#51A5B8" Font-Bold="True" ForeColor="White" />
                <Columns>
                    <asp:TemplateField>
                        <ItemTemplate>
                      	    <asp:Button ID="ButtonEdit" runat = "server" Text="Xem" Width="38px" ForeColor="#0000C0" OnClick="ButtonEdit_Click"/>
                        </ItemTemplate>
                        <EditItemTemplate>
                        </EditItemTemplate>
                        <ItemStyle BorderColor="Silver" BorderStyle="Dotted" BorderWidth="1px" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="T&#234;n đăng nhập" SortExpression="TenDangNhap">
                        <ItemTemplate>
                            <asp:Label ID= "LabelTenDangNhap" runat = "server" Text='<%#Common.FilterStringForColumn(Eval("TenDangNhap").ToString(),50)%>' />
                        </ItemTemplate>
                        <ItemStyle Wrap="True" BorderColor="Silver" BorderStyle="Dotted" BorderWidth="1px" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Họ T&#234;n" SortExpression="HoTen">
                        <ItemTemplate>
                            <asp:Label ID ="LabelHoTen" runat = "server" Text='<%#Common.FilterStringForColumn(Eval("HoTen").ToString(),100)%>'></asp:Label>
                        </ItemTemplate>
                        <ItemStyle Wrap="True" BorderColor="LightGray" BorderStyle="Dotted" BorderWidth="1px" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Số điện thoại" SortExpression="DienThoai">
                        <ItemTemplate>
                            <asp:Label ID="LabelSoDienThoai" runat="server" Text='<%#Eval("DienThoai") %>'></asp:Label>
                        </ItemTemplate>
                        <ItemStyle BorderColor="Silver" BorderStyle="Dotted" BorderWidth="1px" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Địa chỉ" SortExpression="DiaChi">
                        <ItemTemplate>
                            <asp:Label ID="LabelLuotXem" runat="server" Text='<%#Eval("Diachi") %>'></asp:Label>
                        </ItemTemplate>
                        <ItemStyle BorderColor="Silver" BorderStyle="Dotted" BorderWidth="1px" />
                    </asp:TemplateField>
                    <asp:TemplateField>
                        <ItemTemplate>
                      	    <asp:Button ID="ButtonXoa" CssClass="art-button" runat="server" Text="Xóa" Width="38px" ForeColor="Red" OnClick="ButtonXoa_Click"  />
                        </ItemTemplate>
                        <ItemStyle BorderColor="Silver" BorderStyle="Dotted" BorderWidth="1px" />
                        <EditItemTemplate>
                            <table>
                                <tr>
                                <td><asp:Button ID="ButtonDel" runat="server" ForeColor="Red"
                                Text="Ok" Width="35px" OnClick="ButtonDel_Click" /></td>
                                <td><asp:Button ID="ButtonNoDel" runat="server" ForeColor="Blue"
                                Text="No" Width="35px" OnClick="ButtonNoDel_Click" /></td>
                                </tr>
                            </table>
                        </EditItemTemplate>
                    </asp:TemplateField>
                </Columns>
                <EmptyDataRowStyle ForeColor="Red" />
                <AlternatingRowStyle BackColor="#C0D7DD" />
                <PagerSettings Mode="NumericFirstLast" PageButtonCount="3" />
                <EditRowStyle BackColor="#404040" BorderStyle="Solid" BorderWidth="1px"
                    ForeColor="White" />
            </asp:GridView>
            <br />
            <asp:Button ID="btnThemMoi" runat="server" Width = "100px" OnClick="btnThemMoi_Click" Text="Thêm mới " />
</asp:Content>
